package org.example.system.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.system.domain.Student;
import org.example.system.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hewen
 */

@Slf4j
@RestController
@RequestMapping("/test2")
public class UserController {
    @Autowired
    private IStudentService studentService;

    @GetMapping("/test")
    public String test(){
        return "test";
    }

    @GetMapping("/list")
    public List<Student> list(){
        return studentService.list();
    }

    @PostMapping("/register")
    public String register(){
        return null;
    }

    @PostMapping("/login")
    public String login(){
        return null;
    }
}
